import { IPSAppDataEntity } from '../dataentity/ipsapp-data-entity';
import { IPSAppView } from './ipsapp-view';
import { IPSAppViewLogic } from './ipsapp-view-logic';
import { IPSAppViewMsgGroup } from './ipsapp-view-msg-group';
import { IPSAppViewNavContext } from './ipsapp-view-nav-context';
import { IPSAppViewNavParam } from './ipsapp-view-nav-param';
import { IPSAppViewParam } from './ipsapp-view-param';
import { IPSAppViewRef } from './ipsapp-view-ref';
import { IPSControl } from '../../control/ipscontrol';
import { IPSLanguageRes } from '../../res/ipslanguage-res';
import { IPSSysCss } from '../../res/ipssys-css';
import { IPSSysImage } from '../../res/ipssys-image';
import { IPSSysPFPlugin } from '../../res/ipssys-pfplugin';
import { IPSModelObject } from '../../ipsmodel-object';

/**
 *
 * @export
 * @interface IPSAppViewBase
 */
export interface IPSAppViewBase extends IPSModelObject {
  /**
   * 访问用户模式
   * @description 值模式 [视图访问用户] {0：未指定、 2：登录用户、 3：匿名用户及登录用户、 4：登录用户且拥有指定资源能力 }
   * @type {( number | 0 | 2 | 3 | 4)}
   */
  accUserMode: number | 0 | 2 | 3 | 4;

  /**
   * 访问标识
   * @type {string}
   */
  accessKey: string;

  /**
   * 标题语言资源
   *
   * @type {IPSLanguageRes}
   */
  getCapPSLanguageRes(): IPSLanguageRes | null;

  /**
   * 视图标题
   * @type {string}
   */
  caption: string;

  /**
   * 代码标识
   * @type {string}
   */
  codeName: string;

  /**
   * 完整代码标识
   * @type {string}
   */
  fullCodeName: string;

  /**
   * 视图高度
   * @type {number}
   * @default 0
   */
  height: number;

  /**
   * @type {string}
   */
  mainMenuAlign: string;

  /**
   * 视图打开模式
   * @type {string}
   */
  openMode: string;

  /**
   *
   * @type {IPSAppDataEntity}
   */
  getPSAppDataEntity(): IPSAppDataEntity | null;

  /**
   * 视图逻辑集合
   *
   * @type {IPSAppViewLogic[]}
   */
  getPSAppViewLogics(): IPSAppViewLogic[] | null;

  findPSAppViewLogic(objKey: any): IPSAppViewLogic | null;

  /**
   *
   * @type {IPSAppViewMsgGroup}
   */
  getPSAppViewMsgGroup(): IPSAppViewMsgGroup | null;

  /**
   * 视图导航上下文集合
   *
   * @type {IPSAppViewNavContext[]}
   */
  getPSAppViewNavContexts(): IPSAppViewNavContext[] | null;

  findPSAppViewNavContext(objKey: any): IPSAppViewNavContext | null;

  /**
   * 视图导航参数集合
   *
   * @type {IPSAppViewNavParam[]}
   */
  getPSAppViewNavParams(): IPSAppViewNavParam[] | null;

  findPSAppViewNavParam(objKey: any): IPSAppViewNavParam | null;

  /**
   * 视图参数集合
   *
   * @type {IPSAppViewParam[]}
   */
  getPSAppViewParams(): IPSAppViewParam[] | null;

  findPSAppViewParam(objKey: any): IPSAppViewParam | null;

  /**
   * 视图对象引用
   *
   * @type {IPSAppViewRef[]}
   */
  getPSAppViewRefs(): IPSAppViewRef[] | null;

  findPSAppViewRef(objKey: any): IPSAppViewRef | null;

  /**
   * 根部件集合
   *
   * @type {IPSControl[]}
   */
  getPSControls(): IPSControl[] | null;

  findPSControl(objKey: any): IPSControl | null;

  /**
   * 视图界面样式对象
   *
   * @type {IPSSysCss}
   */
  getPSSysCss(): IPSSysCss | null;

  /**
   * 视图图标对象
   *
   * @type {IPSSysImage}
   */
  getPSSysImage(): IPSSysImage | null;

  /**
   * 前端应用插件
   *
   * @type {IPSSysPFPlugin}
   */
  getPSSysPFPlugin(): IPSSysPFPlugin | null;

  /**
   * 视图优先级
   * @type {number}
   * @default -1
   */
  priority: number;

  /**
   * 视图被引用
   * @type {boolean}
   * @default true
   */
  refFlag: boolean;

  /**
   * 实际引用视图
   *
   * @type {IPSAppView}
   */
  getRefPSAppView(): IPSAppView | null;

  /**
   * 子标题语言资源
   *
   * @type {IPSLanguageRes}
   */
  getSubCapPSLanguageRes(): IPSLanguageRes | null;

  /**
   * 视图子标题
   * @type {string}
   */
  subCaption: string;

  /**
   * 视图抬头
   * @type {string}
   */
  title: string;

  /**
   * 抬头语言资源
   *
   * @type {IPSLanguageRes}
   */
  getTitlePSLanguageRes(): IPSLanguageRes | null;

  /**
   * 视图类型
   * @description 值模式 [平台视图类型]
   * @type {string}
   */
  viewType: string;

  /**
   * 视图宽度
   * @type {number}
   * @default 0
   */
  width: number;

  /**
   * 启用数据权限
   * @type {boolean}
   */
  enableDP: boolean;

  /**
   * 支持工作流
   * @type {boolean}
   */
  enableWF: boolean;

  /**
   * 数据选择视图
   * @type {boolean}
   * @default false
   */
  pickupMode: boolean;

  /**
   * 重定向视图
   * @type {boolean}
   * @default false
   */
  redirectView: boolean;

  /**
   * 显示标题栏
   * @type {boolean}
   * @default true
   */
  showCaptionBar: boolean;
}
